package acm.第二轮;

import java.util.Scanner;

public class F {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] arr=new int[sc.nextInt()];
        for (int i = 0; i < arr.length; i++) {
            arr[i]=sc.nextInt();
        }
        int curr=arr[0];
        int count=0;
        int abandon=0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i]>=curr*0.95){
                count++;
                abandon+=curr;
                curr=arr[i];
            }
        }
        System.out.println(count);
        System.out.println(abandon);
        System.out.println(curr);
    }
}
